package com.demo.zyt.modules.app.service.impl;


import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.demo.zyt.common.utils.Query;
import com.demo.zyt.modules.app.dao.WxInviteDao;
import com.demo.zyt.modules.app.entity.WxInviteEntity;
import com.demo.zyt.modules.app.entity.WxUserEntity;
import com.demo.zyt.modules.app.service.WxInviteService;


@Service("wxInviteService")
public class WxInviteServiceImpl extends ServiceImpl<WxInviteDao, WxInviteEntity> implements WxInviteService {
	
	@Autowired
	private WxInviteDao wxInviteDao;

	@Override
	public List<WxUserEntity> getUserInviteList(Integer userId, Map<String, Object> params) {
		Page<WxUserEntity> page = new Query<WxUserEntity>(params).getPage();
		
		return this.wxInviteDao.queryPage(page, userId);
	}

	@Override
	public Integer count(Integer userid) {
		return this.wxInviteDao.count(userid);
	}

	@Override
	public List<WxUserEntity> getAllUserInviteList(Integer userId) {
		return this.wxInviteDao.queryAll(userId);
	}
	
	
	
}
